<?php
class adm_repro extends core_modbase {
	
	function __construct($adm)
	{
		$this->template = new template();
		$this->translator = new translator();
		$session = new session();
		$this->acl = &$adm->acl;
	}
	
	function PAGE_index() {
		$sql = new SQL('news');
		$this->template->assign('edit', core_settings::Get('sitepath') . 'admin/news/edit');
		$this->template->assign('news', $sql->select()->toArray());
		return $this->fetch('adm-list.tpl');
	}
	
	function PAGE_new(){
		var_dump($_SERVER['REQUEST_METHOD'], $_POST);
		if ($_SERVER['REQUEST_METHOD'] == 'POST')
		{
			if ($_POST['title'] == '' || $_POST['data'] == '')
			{
				$this->assign('message', 'checkerror');
			}
		}
		return $this->fetch('adm-new.tpl');
	}
}
